﻿@model TemplateContext<PictureFrame>

@{
	PictureFrame contextObject = Model.Object;
	
	var origin = Model.Local.Get<Point>("origin");
	var positionStyle = string.Format("left: {0}px; top: {1}px; width: {2}px; height: {3}px;",
										(int)contextObject.X + origin.X,
										(int)contextObject.Y + origin.Y,
										(int)contextObject.Width,
										(int)contextObject.Height);
	
	string imgSrc = ImageHelper.GetImageURL(contextObject.PictureFormat.Picture.Image, Model);
}

<img src="@imgSrc" class="pictureframe" style="@positionStyle" />